#include "CApp.h"

void CApp::OnEvent(sf::Event Event)
{
	if(Event.Type == sf::Event::Closed)
		m_Window.Close();

	if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Keyboard::Escape))
        m_Window.Close();

	if (Event.Type == sf::Event::Resized)
		glViewport(0, 0, Event.Size.Width, Event.Size.Height);	
}